package com.wxproject.demo.Utils;/*
 *项目名: WXTEST
 *文件名: RandowcodeUtil
 *创建者: ZQF
 *创建时间:17/01/2021 21:14
 *描述: TODO
 */

import java.util.Random;

public class RandowcodeUtil {
    public static String getCheckCode() {
        String ZiMu = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGJKLZXCVBNM1234567890";
        String result = "";
        Random random = new Random();
        for (int i = 0; i < 4; i++) {
            int index = random.nextInt(ZiMu.length());
            char c = ZiMu.charAt(index);
            result += c;
        }
        return result;
    }
}
